Skip to content

fix: restore editor preview responsiveness after export (#68)#69

Open
Sameer2748 wants to merge 1 commit intowebadderall:mainfrom
Sameer2748:fix/editor-breaks-after-export
Open

fix: restore editor preview responsiveness after export (#68)#69
Sameer2748 wants to merge 1 commit intowebadderall:mainfrom
Sameer2748:fix/editor-breaks-after-export

Conversation

@Sameer2748
Copy link

@Sameer2748 Sameer2748 commented Mar 19, 2026

Fixes #68.

The editor preview panel freezes after heavy video exports. This PR adds a previewVersion state to force a player re-mount on export completion or cancellation. This clears the stale rendering context without losing user changes (zooms/annotations).

Video Demo:
https://github.com/user-attachments/assets/c6cc3e1f-ac56-4312-8558-7c57c0206b1b

Tested locally — works smoothly on multiple exports.

The Pixi.js canvas and video element in the editor preview panel could become
"stalled" or "stale" after a heavy video export render. Because this is a
long async process, the browser's Rendering/Pixi context sometimes fails to
resume frame updates, leaving the preview frozen or unresponsive to interactions.

Changes:
- Added 'previewVersion' state to VideoEditor.tsx to drive component re-mounting.
- Updated VideoEditor.tsx to increment 'previewVersion' in the finally block of the export flow (success, error, or cancel).
- Applied 'previewVersion' to the key of the VideoPlayback component, forcing React to fully re-construct the preview context after each export.
- Enhanced VideoPlayback.tsx to sync the internal time ref with the currentTime prop, ensuring the new player state is correctly seeked after re-mount.
- Added a relayout() method to flush Pixi textures and force an immediate layout refresh for better responsiveness.

Fixes webadderall#68
@coderabbitai
Copy link

coderabbitai bot commented Mar 19, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3c3a345b-6b94-4f36-951d-3cf76d38616b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can scan for known vulnerabilities in your dependencies using OSV Scanner.

OSV Scanner will automatically detect and report security vulnerabilities in your project's dependencies. No additional configuration is required.

@github-actions
Copy link

⚠️ This pull request has been flagged by Anti-Slop.
Our automated checks detected patterns commonly associated with
low-quality or automated/AI submissions (failure count reached).
No automatic closure — a maintainer will review it.
If this is legitimate work, please add more context, link issues, or ping us.

@github-actions github-actions bot added the Slop label Mar 19, 2026
@gurpreetkaits
Copy link
Contributor

@Sameer2748 always try to keep info minimal, easy to read. Less AI Slop.

@Sameer2748
Copy link
Author

Sameer2748 commented Mar 19, 2026

I've trimmed down the description to be more concise. @gurpreetkaits

@webadderall
Copy link
Owner

I'll review this but next time don't submit PRs for issues already assigned to someone.

@gurpreetkaits
Copy link
Contributor

I'll review this but next time don't submit PRs for issues already assigned to someone.

Consider after redesign maybe. See if it doesn't conflict with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Editor breaks after export

3 participants